import { request } from '@umijs/max';

export const addApi = (data: any) => {
  return request('/article/add', {
    method: 'POST',
    data: data,
  });
}

export const selectListApi = (data: any) => {
  return request<any>('/article/selectList', {
    method: 'POST',
    data: data,
  });
}

export const deleteApi = (id: number) => {
  return request<any>('/article/delete', {
    method: 'POST',
    data: {
      ids:[id]
    },
  });
}
export const updateApi = (data: any) => {
  return request('/article/update', {
    method: 'POST',
    data: data,
  });
}

export const selectOneApi = (id: any) => {
  return request('/article/selectOne', {
    method: 'POST',
    data: { id },
  });
}